//
//	Created By Pavel Yankelevich
//	Wednesday, March 26, 2008
//
using OneDayModel.Interfaces;

namespace OneDayModel.Model
{
    public class SessionContext
    {
        private static readonly object lockObject = new object();
        private static SessionContext sessionContext;

        private IUser user;

        public IUser User
        {
            get { return user; }
            set { user = value; }
        }

        public static SessionContext GetInstance()
        {
            if (sessionContext == null)
            {
                lock (lockObject)
                {
                    if (sessionContext == null)
                        sessionContext = new SessionContext();
                }
            }

            return sessionContext;
        }
    }
}